import { defHttp } from '/@/utils/http/axios'

enum Api {
  getList = '/house/query',
  insert = '/house/insert',
  update = '/house/update',
  delete = '/house/delete',
  getListNoOrder = '/house/query/no_order',
}

/**
 * @description:
 */

export const getHouseList = (data) => {
  return defHttp.post({ url: Api.getList, data })
}
export const getListNoOrder = (data) => {
  return defHttp.post({ url: Api.getListNoOrder, data })
}

export const getHouse = (id) => {
  return defHttp.get({ url: `/house/query/id/${id}` })
}

export const insertHouse = (data) => {
  return defHttp.post({ url: Api.insert, data })
}

export const updateHouse = (data) => {
  return defHttp.post({ url: Api.update, data })
}

export const deleteHouse = (data) => {
  return defHttp.post({ url: Api.delete, data })
}
